<?php
include_once "lib/config.php";
require_once("includes/pagetop.php");

$conditionarr=array(":id"=>4);
$pageinfo=$pdodbobj->fetch_array($pdodbobj->query("select * from pages where id=:id",$conditionarr));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AllyFolio | About US </title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all"  />


</head>

<body>

	<div id="main_wrapper">
    <?php
    $pageheading="About";
    require_once("includes/header.php");
    ?>
     <!--=================Body Contain Start=======================-->
    <div class="wrapper">
    	<div class="header">
        		<div class="contain-wrap" style="margin-top:30px;">
                <div class="pri-left">
            		<div class="newAbout">About</div>
                </div>
                    
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
            		<iframe src="getaboutcontent.php?type=content&size=400" style="border: 0;width:980px;" scrolling="0" id="aboutdiv" name="aboutdiv"></iframe>
                    <?php if(strlen($pageinfo[0]['content'])>400){ ?><div class="newMo" align="right" id="aboutmore" style="margin-right:200px;"><a href="javascript:void(0);" id="abouthyper"  onclick="return showcompletedesc('about','content');">....more</a></div><?php } ?>
                <div class="clearfix"></div>
                <br />
                <br />
                <div class="pri-right">
            		<div class="newAbout" style="float:right;">Logo</div>
                </div>
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
            		<iframe src="getaboutcontent.php?type=logo_content&size=400" style="border: 0;width:980px;" scrolling="0" id="logodiv" name="logodiv"></iframe>
                    <?php if(strlen($pageinfo[0]['logo_content'])>400){ ?><div class="newMo" align="left" id="logomore" style="margin-let:200px;"><a href="javascript:void(0);" id="logohyper"  onclick="return showcompletedesc('logo','logo_content');">....more</a></div><?php } ?>
                <div class="clearfix"></div>
                <br />
                <br />
                <div class="pri-left">
            		<div class="newAbout">Security</div>
                </div>
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
            		<iframe src="getaboutcontent.php?type=security_content&size=400" style="border: 0;width:980px;" scrolling="0" id="securitydiv" name="securitydiv"></iframe>
                    <?php if(strlen($pageinfo[0]['security_content'])>400){ ?><div class="newMo" align="right" id="securitymore" style="margin-right:200px;"><a href="javascript:void(0);" id="securityhyper"  onclick="return showcompletedesc('security','security_content');">....more</a></div><?php } ?>
                <div class="clearfix"></div>
                <br />
                <br />
                <div class="pri-right">
            		<div class="newAbout" style="float:right;">Help Center</div>
                </div>
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
            		<iframe src="getaboutcontent.php?type=help_content&size=400" style="border: 0;width:980px;" scrolling="0" id="helpdiv" name="helpdiv"></iframe>
                    <?php if(strlen($pageinfo[0]['help_content'])>400){ ?><div class="newMo" align="left" id="helpmore" style="margin-let:200px;"><a href="javascript:void(0);" id="helphyper"  onclick="return showcompletedesc('help','help_content');">....more</a></div><?php } ?>
                <div class="clearfix"></div>
                <br />
                <br />
                <div class="pri-left">
            		<div class="newAbout">Contact US</div>
                </div>
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
                    
                    <div>&nbsp;</div>
            		<iframe src="getaboutcontent.php?type=contact_content&size=400" style="border: 0;width:980px;" scrolling="0" id="contactdiv" name="contactdiv"></iframe>
                    <?php if(strlen($pageinfo[0]['contact_content'])>400){ ?><div class="newMo" align="right" id="contactmore" style="margin-right:200px;"><a href="javascript:void(0);" id="contacthyper" onclick="return showcompletedesc('contact','contact_content');">....more</a></div><?php } ?>
                <div class="clearfix"></div>
                
            </div>
            
            <div class="clearfix"></div>
            </div>
        
    </div>
    
    <div class="clearfix"></div>
    <!--=================Body Contain end=======================-->
    </div>
<?php
    require_once("includes/footer.php");
?>
<script>
var iframe=null;
var functionid=null;

var typearr=new Array();
typearr[0]="content";
typearr[1]="logo_content";
typearr[2]="security_content";
typearr[3]="help_content";
typearr[4]="contact_content";

var typeexparr=new Array();
typeexparr["content"]=0;
typeexparr["logo_content"]=0;
typeexparr["security_content"]=0;
typeexparr["help_content"]=0;
typeexparr["contact_content"]=0;

var typedivarr=new Array();
typedivarr["content"]="about";
typedivarr["logo_content"]="logo";
typedivarr["security_content"]="security";
typedivarr["help_content"]="help";
typedivarr["contact_content"]="contact";

function showcompletedesc(iframename,valuetype)
{
    for(i=0;i<typearr.length;i++)
    {
        if(typearr[i]==valuetype)
        {
            if(typeexparr[valuetype]==0)
            {
                document.getElementById(iframename+"hyper").innerHTML = "...collapse";
                loc="getaboutcontent.php?type="+valuetype+"&size=0";
                document.getElementById(typedivarr[typearr[i]]+"div").src = loc;
                
                typeexparr[valuetype]=1;
            }
            else
            {
                document.getElementById(iframename+"hyper").innerHTML = "...more";
                loc="getaboutcontent.php?type="+valuetype+"&size=400";
                document.getElementById(typedivarr[typearr[i]]+"div").src = loc;
                
                typeexparr[valuetype]=0;
            }
        }
        else
        {
            if(typeexparr[typearr[i]]==1)
            {
                document.getElementById(typedivarr[typearr[i]]+"hyper").innerHTML = "...more";
                loc="getaboutcontent.php?type="+valuetype+"&size=400";
                document.getElementById(typedivarr[typearr[i]]+"div").src = loc;
                
                typeexparr[typearr[i]]=0;
            }
        }
    }    
    
    //$('#'+iframename1).attr('src', loc);
    //document.getElementById(iframename+'more').style.display='none';
    //iframe=document.getElementById(iframename1);
    functionid = setInterval(setIframeHeightCont,1000);
}

function setIframeHeight() {
    if (iframe) {
        var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
        if (iframeWin.document.body) {
            ifheight = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
            if(ifheight==iframe.height && ifheight!="70")
            {
                window.clearInterval(functionid);
                window.clearInterval(setIframeHeight);
            }
            else
            {
                iframe.height=ifheight;
            }
        }
    }
}

function setIframeHeightCont() {
    
    for(i=0;i<typearr.length;i++)
    {
        iFramename=document.getElementById(typedivarr[typearr[i]]+"div");
        if (iFramename) {
            var iframeWin = iFramename.contentWindow || iFramename.contentDocument.parentWindow;
            if (iframeWin.document.body) {
                ifheight = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
                if(ifheight==iFramename.height && ifheight!="70")
                {
                    iFramename.height=80;
                    window.clearInterval(functionid);
                    window.clearInterval(setIframeHeightCont);
                }
                else
                {
                    iFramename.height=ifheight;
                }
            }
        }
    }
}

function setIframeInitialHeight(iframeobj) {
    if (iframeobj) {
        var iframeWin = iframeobj.contentWindow || iframeobj.contentDocument.parentWindow;
        if (iframeWin.document.body) {
            ifheight = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
            ifheight=80;
            iframeobj.height=ifheight;
        }
    }
}

setIframeInitialHeight(document.getElementById('aboutdiv'));
setIframeInitialHeight(document.getElementById('logodiv'));
setIframeInitialHeight(document.getElementById('securitydiv'));
setIframeInitialHeight(document.getElementById('helpdiv'));
setIframeInitialHeight(document.getElementById('contactdiv'));
</script>